"use strict";

/**
 * @ngdoc function
 * @name jgappApp.controller:AdministratorZjhistoryCtrl
 * @description
 * # AdministratorZjhistoryCtrl
 * Controller of the jgappApp
 */
angular
  .module("jgappApp")
  .controller("AdministratorZjhistoryCtrl", function(
    $scope,
    Util,
    openApi,
    PagingService,
    $routeParams,
    $location
  ) {
    var type=$scope.type = $routeParams.type;
    var id = $routeParams.id;
    var url;
    /*
    借证：1
    还证：2
    */
    if (type==1) {
      url = openApi.getAppointmentRecord;
    } else {
      url = openApi.getReturnRecord;
    }
    // 搜索
    $scope.getData = function() {
      // 参训参数不一样就两个都传了
      var param={};
      param.formId  =id;
      param.cerId  = id;
      $scope.taskList = new PagingService(url, param);
    };
    // 页面初始化请求数据
    var init = function() {
      $scope.getData();
    };
    init();
  });